package com.smmisia.shop.service;

import com.smmisia.common.response.PageResponse;
import com.smmisia.shop.entity.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smmisia.shop.model.ProductVO;
import com.smmisia.shop.request.*;
import com.smmisia.shop.response.ProductCreateResponse;
import com.smmisia.shop.response.ProductInventoryModifyResponse;
import com.smmisia.shop.response.ProductPriceModifyResponse;
import com.smmisia.shop.response.ProductRemoveResponse;


public interface ProductService extends IService<Product> {

    ProductCreateResponse saveProduct(ProductCreateRequest request);

    Boolean existProductStream(String identifier);

    PageResponse<ProductVO> pageQuery(ProductPageQueryRequest request);

    ProductInventoryModifyResponse modifyInventory(ProductInventoryModifyRequest request);

    ProductVO queryById(Long productId);

    ProductPriceModifyResponse modifyPrice(ProductModifyPriceRequest request);

    ProductRemoveResponse removeProduct(ProductRemoveRequest request);

    /**
     * 尝试售卖
     */
    Boolean trySale(ProductTrySaleRequest request);

    /**
     * 取消售卖
     */
    Boolean cancelSale(ProductCancelSaleRequest request);
}
